package com.ljy.my_study.lintcode.末尾的零;
/** 
* @author James
* @date 2018年4月19日 
*/
public class TrailingZerosMain {
	public static void main(String[] args) {
		System.out.println(trailingZeros(50));
	}
	
	public static int trailingZeros(int num) {
		int count=0;
		int n=0;
		while((n=num/5)>0) {
			count+=n;
			num=n;
		}
		return count;
	}
}
